home *** CD-ROM | disk | FTP | other *** search
- Greetings to the one known as Hakan, who also is allegidley babbled this on
- 08-May-97 :
- > >>>amos-list@access.digex.net
-
- > I would like to see some suggestions how to highlight a word printed on
- screen
- > when the mouse pointer is over it.
- > Say i've printed
-
- > Pen 1
- > locate 1,1 : Print"AAA"
- > locate 1,2 : Print"BBB"
-
-
- > Now I want the text to be rewritten with Pen 2
- > only when the pointer is over it.
-
- > I did find some ways to do it but the text always flickers...
-
- > I guess there is some way to get a steady highlight...
-
- There are a few ways that you can do it. You could use the MOUSE ZONE command
- (which would mean having to set zones for each word) and have a routine like:
-
- top:
- Locate 1,1 : ink 1 : print "highlight"
-
- repeat
- if mouse zone=1
- locate 1,1: ink 2 : print "highlight"
- endif
-
- if mouse zone=2
- locate 1,2 : ink 2 : print "another highlight"
- endif
-
- if mouse zone=0
- goto top
- endif
- until false
-
-
- This means, that the routine will only refresh itself, if no parts are
- selected. If you dont do a CLS command in the start of the text, you will then
- not get any flicker, as you are not adding anything new, or removing anything,
- just making the existing text a different colour.
-
- Mush
-
- --------******( Extreme AMOS )******--------
-
- AMOS Raycater completion [####----------------] - 20%
-
- The best AMOS homepages around, full of downloads, and my AMOS disk
- magazine. Order games and utilities directly from the library, for FREE.
-
- See my homepages at http://www.mushy-pd.demon.co.uk or
- http://members.tripod.com/~mushypd for more information, and
- info on my raycaster game!!
-
- Email: mushypd@redrose.net
-
- Look for Andy Kellett on VDOphone online!
- ICQ No. - 778243 (talk to me!!)
-
-
-